import actionType from './actionType'

export function createANewDrawing(payload) {
	return {
		type: actionType.CREATE_A_NEW_DRAWING,
		payload,
	}
}
export function createANewErasing() {
	return {
		type: actionType.CREATE_A_NEW_ERASING,
	}
}
export function sendDrawingDataToStore(payload) {
	return {
		type: actionType.SEND_DRAWING_DATA_TO_STORE,
		payload,
	}
}
export function clearPainting() {
	return {
		type: actionType.CLEAR_PAINTING,
	}
}
export function undoFreeDrawing(payload = -1) {
	return {
		type: actionType.UNDO_FREE_DRAWING,
		payload,
	}
}
export function redoFreeDrawing(payload = 1) {
	return {
		type: actionType.REDO_FREE_DRAWING,
		payload,
	}
}
export function setPencilWidth(payload) {
	return {
		type: actionType.SET_PENCIL_WIDTH,
		payload,
	}
}
export function setEraserWidth(payload) {
	return {
		type: actionType.SET_ERASER_WIDTH,
		payload,
	}
}
export function clearHistory() {
	return {
		type: actionType.CLEAR_HISTORY,
	}
}
